package com.service.Hua.Impl;

import com.mapper.Hua.MaterialWarehousePDMapper;
import com.pojo.Hua.HuaMaterial;
import com.pojo.Hua.HuaMaterialWarehouse;
import com.pojo.Hua.HuaMaterialWarehousePdView;
import com.pojo.Hua.Receipts;
import com.service.Hua.IMaterialWarehousePDService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class MaterialWarehousePDServiceImpl implements IMaterialWarehousePDService {
    @Autowired
    MaterialWarehousePDMapper materialWarehousePDMapper;
    @Override
    public List<HuaMaterial> getMaterials() {
        List<HuaMaterial> materials = materialWarehousePDMapper.getMaterials();
        return materials;
    }

    @Override
    public List<HuaMaterialWarehouse> getBach(Long materialId) {
        return materialWarehousePDMapper.getBach(materialId);
    }

    @Override
    public List<HuaMaterialWarehousePdView> getMaterialWarehousePd(Long materialCode) {
        return materialWarehousePDMapper.getMaterialWarehousePd(materialCode);
    }

    @Override
    public int addPdRecord(Receipts receipts) {
        return materialWarehousePDMapper.addPdRecord(receipts);
    }

    @Override
    public List<Receipts> getReceipts() {
        return materialWarehousePDMapper.getReceipts();
    }
}
